<html>
<head><meta charset="utf-8"><title>lifetime elision #63388 · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html">lifetime elision #63388</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="173036708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173036708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173036708">(Aug 12 2019 at 16:09)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> -- let me know when you're around</p>



<a name="173052276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052276">(Aug 12 2019 at 19:26)</a>:</h4>
<p>o/</p>



<a name="173052440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052440">(Aug 12 2019 at 19:28)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> ohai =)</p>



<a name="173052449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052449">(Aug 12 2019 at 19:28)</a>:</h4>
<p>so I've been trying to close the various issues, as you've probably noticed.</p>



<a name="173052477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052477">(Aug 12 2019 at 19:28)</a>:</h4>
<p>The lifetime elision one (<a href="https://github.com/rust-lang/rust/issues/63388" target="_blank" title="https://github.com/rust-lang/rust/issues/63388">https://github.com/rust-lang/rust/issues/63388</a>) has me the most worried, though</p>



<a name="173052487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052487">(Aug 12 2019 at 19:29)</a>:</h4>
<p>the current behavior is definitely incorrect</p>



<a name="173052755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052755">(Aug 12 2019 at 19:32)</a>:</h4>
<p>indeed</p>



<a name="173052809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052809">(Aug 12 2019 at 19:33)</a>:</h4>
<p>what you described is what the code does (looking for exactly one unnamed lifetime parameter, and using that as the elided lifetime)</p>



<a name="173052906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052906">(Aug 12 2019 at 19:34)</a>:</h4>
<p>yes</p>



<a name="173052912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052912">(Aug 12 2019 at 19:34)</a>:</h4>
<p>I'm not sure how to fix that</p>



<a name="173052919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052919">(Aug 12 2019 at 19:34)</a>:</h4>
<p>I mean obviously we need to change the approach</p>



<a name="173052973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173052973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173052973">(Aug 12 2019 at 19:35)</a>:</h4>
<p>well I'd say <span class="user-mention" data-user-id="126931">@centril</span>'s desire for lots of tests is clearly validated :)</p>



<a name="173053052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053052">(Aug 12 2019 at 19:36)</a>:</h4>
<p>where is the other lifetime elision code to be found...</p>



<a name="173053150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053150">(Aug 12 2019 at 19:37)</a>:</h4>
<p>answer: <code>middle/resolve_lifetime.rs</code>, around line 2100</p>



<a name="173053235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053235">(Aug 12 2019 at 19:38)</a>:</h4>
<p>it seems...not entirely implausible that code could be factored out</p>



<a name="173053256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053256">(Aug 12 2019 at 19:38)</a>:</h4>
<p>well, maybe kinda implausible, as it uses a visitor I think</p>



<a name="173053275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053275">(Aug 12 2019 at 19:39)</a>:</h4>
<p>I am not happy to be down to the wire like this :(</p>



<a name="173053299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053299">(Aug 12 2019 at 19:39)</a>:</h4>
<p>ah well I guess a HIR visitor doesn't require a tcx</p>



<a name="173053569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053569">(Aug 12 2019 at 19:43)</a>:</h4>
<p>ok, wait, what am I saying, this code really wants to be part of resolve lifetimes</p>



<a name="173053810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053810">(Aug 12 2019 at 19:47)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> so -- why do we have to do this logic in HIR lowering? Seems like instead we could move the logic to resolve-lifetimes to avoid duplication. For example:</p>
<div class="codehilite"><pre><span></span><span class="n">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">(...)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="p">[</span><span class="o">&amp;</span><span class="kt">u32</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">..</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>


<p>could get converted to</p>
<div class="codehilite"><pre><span></span><span class="k">type</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;E</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;E</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;E</span><span class="w"> </span><span class="kt">u32</span><span class="w"> </span><span class="p">];</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">foo</span><span class="p">(...)</span><span class="w"> </span>-&gt; <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">..</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>


<p>or even</p>
<div class="codehilite"><pre><span></span><span class="k">type</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;E1</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;E2</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;E1</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;E2</span><span class="w"> </span><span class="kt">u32</span><span class="w"> </span><span class="p">];</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">foo</span><span class="p">(...)</span><span class="w"> </span>-&gt; <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;_</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">..</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="173053900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053900">(Aug 12 2019 at 19:48)</a>:</h4>
<p>i.e., we create a fresh parameter for each elided lifetime, and then the "value" we supply for that parameter is <code>'_</code></p>



<a name="173053913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053913">(Aug 12 2019 at 19:48)</a>:</h4>
<p>or we create at most one parameter, same thing</p>



<a name="173053927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173053927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173053927">(Aug 12 2019 at 19:48)</a>:</h4>
<p>as a benefit, I think all the complex elision cases would "just work"</p>



<a name="173054388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173054388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173054388">(Aug 12 2019 at 19:55)</a>:</h4>
<p>let me see if I can implement that</p>



<a name="173056975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173056975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173056975">(Aug 12 2019 at 20:24)</a>:</h4>
<p>I rolled up the 2 current approved async PRs with p=50 so they should test in 3 hours or so</p>



<a name="173057050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173057050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173057050">(Aug 12 2019 at 20:25)</a>:</h4>
<p>welp I think I implemented the scheme I described ab ove</p>



<a name="173057063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173057063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173057063">(Aug 12 2019 at 20:25)</a>:</h4>
<p>of course, it hasn't even finished building yet, much less having been tested</p>



<a name="173058650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173058650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173058650">(Aug 12 2019 at 20:42)</a>:</h4>
<p>seems to work</p>



<a name="173058667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173058667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173058667">(Aug 12 2019 at 20:43)</a>:</h4>
<p>also, code is way simpler</p>



<a name="173059573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173059573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173059573">(Aug 12 2019 at 20:53)</a>:</h4>
<p>ok ok it's not <em>quite</em> right, but getting close</p>



<a name="173060436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060436">(Aug 12 2019 at 21:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> nice; can you also include some more tests, e.g. the ones in <a href="https://github.com/rust-lang/rust/issues/63388#issuecomment-520557204" target="_blank" title="https://github.com/rust-lang/rust/issues/63388#issuecomment-520557204">https://github.com/rust-lang/rust/issues/63388#issuecomment-520557204</a> ?</p>



<a name="173060446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060446">(Aug 12 2019 at 21:03)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> yep, already did that</p>



<a name="173060452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060452">(Aug 12 2019 at 21:03)</a>:</h4>
<p>great <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="173060456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060456">(Aug 12 2019 at 21:03)</a>:</h4>
<p>I'm just double checking that the behavior in all of your tests matches</p>



<a name="173060538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060538">(Aug 12 2019 at 21:04)</a>:</h4>
<p>there's also the README.md that might need some updating ^^</p>



<a name="173060543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060543">(Aug 12 2019 at 21:04)</a>:</h4>
<p>yes, I did that too</p>



<a name="173060545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060545">(Aug 12 2019 at 21:04)</a>:</h4>
<p>which is why I'm double checking</p>



<a name="173060550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060550">(Aug 12 2019 at 21:04)</a>:</h4>
<p>hehe, awesome</p>



<a name="173060551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060551">(Aug 12 2019 at 21:04)</a>:</h4>
<p>to be sure I'm not lying :)</p>



<a name="173060857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060857">(Aug 12 2019 at 21:08)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> just to be clear, the original test from <a href="https://github.com/rust-lang/rust/issues/63388" target="_blank" title="https://github.com/rust-lang/rust/issues/63388">#63388</a> is included in your original test suite, right?</p>



<a name="173060866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060866">(Aug 12 2019 at 21:08)</a>:</h4>
<p>i.e., I don't have to add that one</p>



<a name="173060883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060883">(Aug 12 2019 at 21:08)</a>:</h4>
<p>lemme double check</p>



<a name="173060982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060982">(Aug 12 2019 at 21:10)</a>:</h4>
<p>I just checked</p>



<a name="173060998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173060998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173060998">(Aug 12 2019 at 21:10)</a>:</h4>
<p>it's in <a href="http://ref-self.rs" target="_blank" title="http://ref-self.rs">ref-self.rs</a></p>



<a name="173061053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061053">(Aug 12 2019 at 21:11)</a>:</h4>
<p>ah but that one is slightly different in that it isn't a <code>// check-pass</code> test</p>



<a name="173061149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061149">(Aug 12 2019 at 21:12)</a>:</h4>
<p>(notice that the test in the issue returns <code>self</code>, which makes it pass)</p>



<a name="173061165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061165">(Aug 12 2019 at 21:12)</a>:</h4>
<p>(in <code>ref-self.rs</code> it returns <code>f</code>, which makes it fail)</p>



<a name="173061324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061324">(Aug 12 2019 at 21:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ^-- would be good to include the <code>// check-pass</code> version to have more confidence</p>



<a name="173061339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061339">(Aug 12 2019 at 21:14)</a>:</h4>
<p>OK</p>



<a name="173061646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061646">(Aug 12 2019 at 21:18)</a>:</h4>
<p>thanks</p>



<a name="173061716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061716">(Aug 12 2019 at 21:19)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> you should find it in <a href="https://github.com/rust-lang/rust/pull/63499" target="_blank" title="https://github.com/rust-lang/rust/pull/63499">https://github.com/rust-lang/rust/pull/63499</a> -- <a href="http://issue-63388-4.rs" target="_blank" title="http://issue-63388-4.rs">issue-63388-4.rs</a> I think</p>



<a name="173061741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173061741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173061741">(Aug 12 2019 at 21:19)</a>:</h4>
<p><code>-4</code> :P wow =)</p>



<a name="173062477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173062477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173062477">(Aug 12 2019 at 21:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  the docs in README.md are slightly off; some <code>X</code>s for "Pass?" turned into <code>✓</code>s when the non-<code>async fn</code> test is also <code>X</code></p>



<a name="173062538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173062538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173062538">(Aug 12 2019 at 21:27)</a>:</h4>
<p>but that's mostly a nit</p>



<a name="173065467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173065467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173065467">(Aug 12 2019 at 22:01)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> oh maybe I misunderstood the structure of the docs; I thought "check" would mean "match non async" :)</p>



<a name="173065715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173065715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173065715">(Aug 12 2019 at 22:05)</a>:</h4>
<p>That was the point of the second "conforms" column =P</p>



<a name="173112026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112026">(Aug 13 2019 at 13:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'm looking forward to the day where no PR fails due to a lack of <code>--bless --compare-mode=nll</code></p>



<a name="173112043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112043">(Aug 13 2019 at 13:17)</a>:</h4>
<p>of course, they'll fail due to a lack of <code>--compare-mode=polonius</code> instead ;)</p>



<a name="173112118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112118">(Aug 13 2019 at 13:18)</a>:</h4>
<p>I had a feeling I was forgetting something related to nll and bless</p>



<a name="173112128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112128">(Aug 13 2019 at 13:18)</a>:</h4>
<p>It is also annoying that x.py --test never terminates on my machine</p>



<a name="173112142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112142">(Aug 13 2019 at 13:18)</a>:</h4>
<p>it errors out somewhere in run-pass fulldeps</p>



<a name="173112151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112151">(Aug 13 2019 at 13:18)</a>:</h4>
<p>aw <span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span> known issue / file one?</p>



<a name="173112157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112157">(Aug 13 2019 at 13:18)</a>:</h4>
<div class="codehilite"><pre><span></span>[run-make] run-make-fulldeps/linker-output-non-utf8
</pre></div>



<a name="173112169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173112169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173112169">(Aug 13 2019 at 13:18)</a>:</h4>
<p>I'm not sure, I was going to maybe search for it today</p>



<a name="173113167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173113167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173113167">(Aug 13 2019 at 13:30)</a>:</h4>
<p>(filed <a href="https://github.com/rust-lang/rust/issues/63520" target="_blank" title="https://github.com/rust-lang/rust/issues/63520">https://github.com/rust-lang/rust/issues/63520</a>)</p>



<a name="173116331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/lifetime%20elision%20%2363388/near/173116331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/lifetime.20elision.20.2363388.html#173116331">(Aug 13 2019 at 14:10)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> if you can re-review last commit of <a href="https://github.com/rust-lang/rust/pull/63501" target="_blank" title="https://github.com/rust-lang/rust/pull/63501">https://github.com/rust-lang/rust/pull/63501</a>, would be great</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>